﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using onHaj.Code.BusinessLogic;

namespace AresCustomYacht
{
    public partial class Contact : System.Web.UI.Page
    {
     

        protected void Button1_Click(object sender, EventArgs e)
        {
           
             onSoftMail mail = new onSoftMail(HttpContext.Current);
            var messageParameters = new Dictionary<string,string>();
            messageParameters.Add("{Name}", dfsName.Text);
             messageParameters.Add("{Phone}", dfsPhone.Text);
             messageParameters.Add("{E-mail}", dfsEmail.Text);
             messageParameters.Add("{Comments}", dfscomments.Text);
            

         


             mail.SendMail(@"html/ThankYou.htm", dfsEmail.Text, "Thank You", messageParameters);
             mail.SendMail(@"html/ContactNotification.html", "info@aresmarine.com", "Notification", messageParameters);
            Response.Redirect("Thanks.html");
        }
            
            // bp.BusinessLogic.Mail mail = new bp.BusinessLogic.Mail();
           // //Confirmation page that will be sent to the user
           // string msg = mail.SendMail(Server.MapPath("ContactConfirmation.html"), "mail.bpwe.net", "rick@aresmarine.com", dfsEmail.Text,
           //                           "root@bpwe.net", "Nv4c7df7", "Thank You: Ares Custom Yacht", dfsName.Text, "",
           //                           "", Guid.NewGuid(), "", "", "");



           // //notification page
           // mail.SendMail(Server.MapPath("ContactNotification.html"), "mail.bpwe.net", dfsEmail.Text, "rick@aresmarine.com",
           // "root@bpwe.net", "Nv4c7df7", "Contact Notification", "Ares Custom Yacht", "",


           //dfsName.Text + "<br/>" + "Phone Number:" + dfsPhone.Text + "<br/>" + "Email Address" + dfsEmail.Text + "Message" + dfscomments.Text, Guid.NewGuid(), "", "", "");

           // Response.Redirect("Thank-You.aspx");

        }
   
}